package org.example.Server.mapper.examination;

import org.apache.ibatis.annotations.Mapper;
import org.example.Server.model.examination.*;
import org.example.Server.model.semester.SemStu;

import java.util.List;

@Mapper
public interface TeachExamMapper {
    void addExam(TeachExamDTO teachExamDTO);

    void addPaperRule(ExamSetting examSetting);

    ExamSetting getPaperRule(Integer examId);

    List<ExamStu> getPaperAnsList(Integer divisionId, Integer submitStatus, Integer markStatus, Integer examId);

    void addExamRemind(List<ExamRemind> examRemindList);

    void deleteExamsByIds(Integer[] ids);

    /**
     * 根据学生考试id查找学生课程信息
     *
     * @param stuExamId
     * @return
     */
    SemStu getStuByStuExamId(Integer stuExamId, Integer semId);

    /**
     * 根据试卷id和学生考试id获取试卷题型应得分以及学生得分
     *
     * @param stuExamId
     * @param paperId
     * @return
     */
    List<ExamStuFormat> getExamStuFormat(Integer stuExamId, Integer paperId);

    /**
     * 删除考试提醒列表
     *
     * @param remindDellist
     */
    void delExamRemind(List<ExamRemind> remindDellist);

    /**
     * 更新考试提醒列表
     *
     * @param remindUpdatelist
     */
    void updateExamRemind(List<ExamRemind> remindUpdatelist);

    /**
     * 获取学生答题详情
     *
     * @param paperId
     * @return
     */
    List<ExamStuQna> getStuQandA(Integer paperId, Integer stuExamId);

    /**
     * 获取学生答题详情
     *
     * @param paperId
     * @return
     */
    List<ExamStuSel> getStuQSelect(Integer paperId, String qsType, Integer stuExamId);

    void updateExamStu(List<ExamStuQs> examStuQs);

    void updateExamMark(Integer stuExamId);

    void updateExamStuGetscore(Integer stuExamId);
}
